package demo.activity;

import demo.zandroid.R;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListView;

public class ListViewEmptyActivity extends Activity {

	private View emptyView;
	private ListView listView;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_listview);

		listView = (ListView) findViewById(R.id.listView1);
		emptyView = findViewById(R.id.listView1_empty);
		listView.setEmptyView(emptyView);

		listView.setAdapter(new ArrayAdapter<String>(this,
				android.R.layout.simple_list_item_1, new String[] {}));
	}

}
